package cn.iocoder.yudao.module.wallet.service.eth;

import cn.iocoder.yudao.module.wallet.controller.app.request.TransferEthRequest;
import cn.iocoder.yudao.module.wallet.controller.app.response.TransactionResponse;
import cn.iocoder.yudao.module.wallet.entity.WalletEntity;

import java.math.BigDecimal;
import java.math.BigInteger;

/**
 * @author liutao
 * @version 1.0
 * @description: TODO
 * @date 2024/10/31 16:27
 */
public interface EthService {
    WalletEntity importMnemonic(String mnemonic, String password);

    BigInteger getBlockNumber();
    String getWebBlockNumber();

    BigDecimal getBalance(String address);

    BigInteger doGetEthGasPrice();

    BigInteger getNonce(String address);

    BigInteger doGetChainId();

    String transfer(TransferEthRequest req);

    /**
     * 根据hash值获取交易
     * @param hash
     * @return
     */
    TransactionResponse transaction(String hash);
}
